package org.example.provider;

import org.example.framework.Protocol;
import org.example.framework.ProtocolFactory;
import org.example.framework.URL;
import org.example.provider.api.HelloService;
import org.example.provider.impl.HelloServiceImpl;

public class Provider {
    private static boolean isRun = true;

    public static void main(String[] args) {
        String protocolName = System.getProperty("protocol");
        URL url = new URL(protocolName, "localhost", 8080, HelloService.class.getName(), HelloServiceImpl.class);
        Protocol protocol = ProtocolFactory.getProtocol(protocolName);
        protocol.export(url);
    }
}
